<!doctype html>
<html lang="en">
<head>
    <title>Code coverage report for src/components/MDM/Organization/Role/List.vue</title>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="..\..\..\..\..\prettify.css" />
    <link rel="stylesheet" href="..\..\..\..\..\base.css" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style type='text/css'>
        .coverage-summary .sorter {
            background-image: url(..\..\..\..\..\sort-arrow-sprite.png);
        }
    </style>
</head>
<body>
<div class='wrapper'>
  <div class='pad1'>
    <h1>
      <a href="..\..\..\..\..\index.html">All files</a> / <a href="index.html">src/components/MDM/Organization/Role</a> List.vue
    </h1>
    <div class='clearfix'>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Statements</span>
        <span class='fraction'>0/49</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Branches</span>
        <span class='fraction'>0/20</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Functions</span>
        <span class='fraction'>0/19</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Lines</span>
        <span class='fraction'>0/49</span>
      </div>
    </div>
  </div>
  <div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">&lt;template&gt;
  &lt;div o-Container&gt;
    &lt;o-list v-bind:source="list.role"
            v-bind="{created:create,modified:modify}"/&gt;
    &lt;div class="modal fade text-center" id="ModifyPanel" tabindex="-1" role="dialog"
         aria-labelledby="myModalLabel"
         aria-hidden="true"&gt;
      &lt;div class="modal-dialog"&gt;
        &lt;div class="modal-content"&gt;
          &lt;div class="modal-body text-left"&gt;
            &lt;o-item v-bind:source="item.role" v-bind="{saved:save,backed:back,loaded:load}"&gt;&lt;/o-item&gt;
            &lt;!--            {{functionCheckData}}--&gt;
            &lt;div class="OctopusItem" title="角色权限配置面板。"&gt;
              &lt;div class="Content"&gt;
                &lt;el-tabs v-model="systemTab" @tab-click="handleClick"&gt;
                  &lt;el-tab-pane v-for="system in functionData.data.queryData" v-if="system.ParentID == 0"
                               v-bind="{label:system.Name,name:'sys_'+system.ID}"
                               :key="system.ID"&gt;
                    &lt;div v-for="pkg in functionData.data.queryData" v-if="pkg.ParentID == system.ID"&gt;
                      &lt;div class="Package"&gt;
                        &lt;el-checkbox :label="pkg.ID" :key="pkg.ID" border v-model="functionCheckData[pkg.ID]"
                                     @change="checkFunction"&gt;
                          {{pkg.Name}}
                        &lt;/el-checkbox&gt;
                      &lt;/div&gt;
                      &lt;div class="PackageItem"&gt;
                        &lt;el-checkbox v-for="fun in functionData.data.queryData" :label="fun.ID"
                                     :key="fun.ID" border v-model="functionCheckData[fun.ID]"
                                     @change="checkFunction" v-if="pkg.ID == fun.ParentID &amp;&amp; reloadFunction"&gt;
                          {{fun.Name}}
                        &lt;/el-checkbox&gt;
                      &lt;/div&gt;
                    &lt;/div&gt;
                  &lt;/el-tab-pane&gt;
                &lt;/el-tabs&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;&lt;!-- /.modal-content --&gt;
      &lt;/div&gt;&lt;!-- /.modal --&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/template&gt;
&nbsp;
&lt;script&gt;
  export default {
    name: "mms_platform_role_list", /* 这个name暂时不知道用啥用，根据官方文档说的是方便排错的 */
<span class="fstat-no" title="function not covered" >    data() {</span>
<span class="cstat-no" title="statement not covered" >      return {</span>
        octopus: this.$parent.octopus,
        systemTab: '',
        functionData: {data: {}},
        functionCheckData: {}, // 选中的功能包数据
        reloadFunction: true,
        list: {
          role: {
            data: {
              id: 10, // 角色数据源ID
              cellData: null,
            }
          },
        },
        item: {
          role: {
            // 以下参数默认由组件内部创建，但是如果有需要，开发人员可在这里提前设置，组件将按照您的预期渲染。
            // cache: false,
            // control: null,
            // dataExtend: null,
            data: {
              id: 10,
              value: "",
              cellData: [
                {name: "CompanyID"},
                {name: "DepartmentID", link: [{binding: "CompanyID", mapping: "CompanyID"}]},
                {name: "Name"},
                {name: "ProjectList", link: [{binding: "CompanyID", mapping: "CompanyID"}]},
                {name: "BuildingList", link: [{binding: "ProjectList", mapping: "ProjectID"}]},
                {name: "Sort"},
                {name: "CreateDate"},
                {name: "Note"},
                {name: "FunctionData", show: true}, // 调试时打开
              ]
            },
          },
        }
      }
    },
<span class="fstat-no" title="function not covered" >    created: function () {</span>
<span class="cstat-no" title="statement not covered" >      this.init();</span>
    },
    methods: {
<span class="fstat-no" title="function not covered" >      create: function () {</span>
<span class="cstat-no" title="statement not covered" >        this.loadData(null);</span>
      },
<span class="fstat-no" title="function not covered" >      modify: function (row) {</span>
<span class="cstat-no" title="statement not covered" >        this.loadData(row.ID);</span>
      },
      // 重载的加载数据，不是监听的load。
<span class="fstat-no" title="function not covered" >      loadData: function (value) {</span>
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >        $(function () {</span></span>
<span class="cstat-no" title="statement not covered" >          $("#ModifyPanel").modal('show');</span>
        });
&nbsp;
<span class="cstat-no" title="statement not covered" >        this.functionCheckData = {};</span>
<span class="cstat-no" title="statement not covered" >        this.reloadFunction = true;</span>
&nbsp;
<span class="cstat-no" title="statement not covered" >        this.item.role.data.value = value;</span>
<span class="cstat-no" title="statement not covered" >        this.item.role.control.load();</span>
      },
<span class="fstat-no" title="function not covered" >      init: function () {</span>
<span class="cstat-no" title="statement not covered" >        this.list.role.data.cellData = [</span>
          {
            name: "CompanyID", width: 100, searchKey: "=", filterKey: "=",
            filterValue: this.octopus.passport.authorization.company, show: false
          },
          {
            name: "DepartmentID", width: 100, searchKey: "=",
            link: [{mapping: "CompanyID", value: this.octopus.passport.authorization.company}]
          },
          {name: "Name", width: 120, searchKey: "LIKE"},
          {
            name: "ProjectList", width: 120, searchKey: "LIKE",
            link: [{binding: "CompanyID", mapping: "CompanyID"}]
          },
          {
            name: "BuildingList", width: 120, searchKey: "LIKE",
            link: [{binding: "ProjectList", mapping: "ProjectID"}]
          },
          {name: "Sort", width: 50},
          {name: "FunctionData", width: 500},
          {name: "CreateDate", width: 160},
        ]
&nbsp;
<span class="cstat-no" title="statement not covered" >        this.initFunction();</span>
      },
      // 功能包没有必要反复加载，仅加载一次就可以。
<span class="fstat-no" title="function not covered" >      initFunction: function () {</span>
<span class="cstat-no" title="statement not covered" >        let o = this;</span>
        // 请求后台八爪鱼API框架。
<span class="cstat-no" title="statement not covered" >        this.octopus.request.api.post("/Octopus/Engine/List", {</span>
            id: 71,
            orderData: "Sort ASC",
            cellData: [
              {name: "Name"},
              {name: "ParentID"},
            ],
            pageData: {
              index: 1, listSize: 10, rowSize: 9999 // 功能包，全部加载。
            }
          },
          // 处理回调事件，通过分析data.status.code的状态来实现。
<span class="fstat-no" title="function not covered" >          function (data) {</span>
<span class="cstat-no" title="statement not covered" >            if (data.status.code == 200) {</span>
<span class="cstat-no" title="statement not covered" >              o.$set(o.functionData, "data", data.content);</span>
&nbsp;
            } else {
<span class="cstat-no" title="statement not covered" >              o.octopus.tips.error(data);</span>
            }
          });
      },
      // 角色数据加载完成返回，此处创建有缺陷
<span class="fstat-no" title="function not covered" >      load: function (data) {</span>
<span class="cstat-no" title="statement not covered" >        let o = this;</span>
&nbsp;
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >        $(data.content.cellData).each(function (index, item) {</span></span>
<span class="cstat-no" title="statement not covered" >          if (item.name == "CompanyID") {</span>
            // 创建时触发
<span class="cstat-no" title="statement not covered" >            if (o.octopus.tools.IsNullOrEmpty(data.content.value)) {</span>
<span class="cstat-no" title="statement not covered" >              item.defaultValue = o.octopus.passport.authorization.company.toString();</span>
              // 触发change事件，因为该控件是有联动效果的
<span class="cstat-no" title="statement not covered" >              o.item.role.control.change(item, null);</span>
            }
            // 设置为禁用
<span class="cstat-no" title="statement not covered" >            item.disabled = true;</span>
          }
        });
&nbsp;
        // 创建时触发
<span class="cstat-no" title="statement not covered" >        if (!this.octopus.tools.IsNullOrEmpty(data.content.value)) {</span>
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >          let FunctionDataColumn = $.grep(data.content.cellData, function (value) {</span></span>
<span class="cstat-no" title="statement not covered" >            return value.name == "FunctionData";//筛选出当前数据列数据</span>
          });
<span class="cstat-no" title="statement not covered" >          if (FunctionDataColumn) {</span>
<span class="cstat-no" title="statement not covered" >            let fData = FunctionDataColumn[0];</span>
            // 加载赋值，如果为空则设置为空，否则element-ui会报错，他的复选框group的对象不能为null。
&nbsp;
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >            $(fData.defaultValue || []).each(function (index, item) {</span></span>
<span class="cstat-no" title="statement not covered" >              if (!o.octopus.tools.IsNullOrEmpty(item)) {</span>
<span class="cstat-no" title="statement not covered" >                o.$set(o.functionCheckData, item, true);</span>
              }
            });
          }
        }
&nbsp;
        // 因为弹出是请求数据之前，所以500毫秒足以。
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >        setTimeout(function () {</span></span>
<span class="cstat-no" title="statement not covered" >          if (!(($("#ModifyPanel").css('display')) === "none")) {</span>
<span class="cstat-no" title="statement not covered" >            o.systemTab = "sys_1";</span>
          }
        }, 500);
      },
<span class="fstat-no" title="function not covered" >      save: function (data) {</span>
<span class="cstat-no" title="statement not covered" >        this.octopus.tips.success(data);</span>
        // 刷新list
<span class="cstat-no" title="statement not covered" >        this.list.role.control.load();</span>
<span class="cstat-no" title="statement not covered" >        this.back();</span>
      },
<span class="fstat-no" title="function not covered" >      back: function () {</span>
<span class="cstat-no" title="statement not covered" >        this.reloadFunction = false;</span>
<span class="cstat-no" title="statement not covered" >        $("#ModifyPanel").modal('hide');</span>
      },
<span class="fstat-no" title="function not covered" >      checkFunction: function (value) {</span>
<span class="cstat-no" title="statement not covered" >        let FunctionData = [];</span>
<span class="cstat-no" title="statement not covered" >        for (let code in this.functionCheckData) {</span>
<span class="cstat-no" title="statement not covered" >          let ac = this.functionCheckData[code];</span>
<span class="cstat-no" title="statement not covered" >          if (ac) {</span>
<span class="cstat-no" title="statement not covered" >            FunctionData.push(code);</span>
          }
        }
&nbsp;
        // 每次选择/取消 更新功能包字段。
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >        $(this.item.role.data.cellData).each(function (index, item) {</span></span>
<span class="cstat-no" title="statement not covered" >          if (item.name == "FunctionData") {</span>
<span class="cstat-no" title="statement not covered" >            item.defaultValue = FunctionData;</span>
          }
        });
&nbsp;
<span class="cstat-no" title="statement not covered" >        console.log("Check: " + JSON.stringify(FunctionData));</span>
      },
<span class="fstat-no" title="function not covered" >      handleClick(tab, event) {</span>
        // console.log(tab, event);
      },
    },
    props: ["oData"]
  }
&lt;/script&gt;
&nbsp;
&lt;style scoped&gt;
&nbsp;
&lt;/style&gt;
&nbsp;</pre></td></tr>
</table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
  Code coverage
  generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Mon Jan 20 2020 17:54:15 GMT+0800 (GMT+08:00)
</div>
</div>
<script src="..\..\..\..\..\prettify.js"></script>
<script>
window.onload = function () {
        if (typeof prettyPrint === 'function') {
            prettyPrint();
        }
};
</script>
<script src="..\..\..\..\..\sorter.js"></script>
</body>
</html>
